package com.one.rope.mvp.web.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Weijian.Liu
 * @desc 企业融资阶段枚举
 * @date 2020/2/20 14:47
 */
@Getter
@AllArgsConstructor
public enum CompanyFinanceStageEnum {

  /**
   * 1：种子轮 2：天使轮 3：A轮 4：B轮 5：C轮 6：D轮 7：D轮以上 8：IPO计划 9：已上市
   */
  STAGE1(1, "种子轮"),
  STAGE2(2, "天使轮"),
  STAGE3(3, "A轮"),
  STAGE4(4, "B轮"),
  STAGE5(5, "C轮"),
  STAGE6(6, "D轮"),
  STAGE7(7, "D轮及以上"),
  STAGE8(8, "IPO计划"),
  STAGE9(9, "已上市"),
  STAGE10(10, "不需要融资");

  private int code;
  private String name;

  public static String getName(int code) {
    for (CompanyFinanceStageEnum o : CompanyFinanceStageEnum.values()) {
      if (o.code == code) {
        return o.name;
      }
    }
    return "";
  }
}
